/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package view;

import javax.swing.JPanel;

/**
 *
 * @author lOaD
 */
public class PanelGg1 extends javax.swing.JPanel {

    /**
     * Creates new form PanelGg1
     */
    
    private PanelGg1Ingresar gg1ingresar = new PanelGg1Ingresar();
    public PanelGg1() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        PanelCentral = new javax.swing.JPanel();
        jToolBar1 = new javax.swing.JToolBar();
        btingresar = new javax.swing.JButton();
        btcargar = new javax.swing.JButton();

        PanelCentral.setLayout(new java.awt.BorderLayout());

        jToolBar1.setRollover(true);

        btingresar.setText("Ingresar Datos");
        btingresar.setFocusable(false);
        btingresar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btingresar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btingresar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btingresarActionPerformed(evt);
            }
        });
        jToolBar1.add(btingresar);

        btcargar.setText("Cargar Datos");
        btcargar.setFocusable(false);
        btcargar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btcargar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btcargar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btcargarActionPerformed(evt);
            }
        });
        jToolBar1.add(btcargar);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 400, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(10, 10, Short.MAX_VALUE))
            .addComponent(PanelCentral, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(PanelCentral, javax.swing.GroupLayout.DEFAULT_SIZE, 271, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void btingresarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btingresarActionPerformed

        setpanel(gg1ingresar);
    }//GEN-LAST:event_btingresarActionPerformed

    private void btcargarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btcargarActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btcargarActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel PanelCentral;
    private javax.swing.JButton btcargar;
    private javax.swing.JButton btingresar;
    private javax.swing.JToolBar jToolBar1;
    // End of variables declaration//GEN-END:variables

        private void setpanel(JPanel panel) {
        PanelCentral.setVisible(false);
        PanelCentral.removeAll();
        PanelCentral.setVisible(true);
        PanelCentral.add(panel);
    }


}
